import pandas as pd

img_url = "https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1oC6Pn.img"

img_str = '<img src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1oC6Pn.img" width="100" height="100">'

# excel_name = "D:\\数据\\excel\\a.xlsx"
excel_name = "/Users/daydaisy/Desktop/a.xlsx"
# 创建一个DataFrame
data = {'姓名': ['Bob', 'Alice'], '年龄': [30,
                                           f'={img_str}']}
df = pd.DataFrame(data)

# 将DataFrame写入Excel文件
df.to_excel(excel_name, index=False)
